package org.example.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.example.service.ElderlyService;
import org.example.utils.ElderlyUpdateRequest;
import org.example.utils.R;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

/**
 * ClassName: ElderlyController
 * Description:
 *
 * @Author Kotaro
 * @Create 2024/12/5 15:26
 * @Version 1.0
 */
@CrossOrigin //允许其他源访问我们的controller
@RestController
@RequestMapping("elderly")
@Slf4j
public class ElderlyController {

    @Resource
    private ElderlyService elderlyService;

    @PutMapping("update")
    public R updateElderlyByElderlyId(@RequestBody ElderlyUpdateRequest elderlyUpdateRequest){
        R r = elderlyService.updateElderlyByElderlyId(elderlyUpdateRequest);
        return r;
    }
}
